import request from "@/utils/request"
// 获取管理员列表
export const getRoleListFn = (page) => {
    return request({
        url:`admin/role/${page}`,
        method:'GET'
    })
}
//新增角色
export const addRolesFn = (data) => {
    return request({
        url:`admin/role`,
        method:'POST',
        data
    })
}
//编辑角色
export const editRolesFn = (id,data) => {
    return request({
        url:`admin/role/${id}`,
        method:'POST',
        data
    })
}
// 删除角色
export const delRolesFn = (id) => {
    return request({
        url:`admin/role/${id}/delete`,
        method:'POST'
    })
}
// 修改角色启用状态
export const editStatusFn = (id,status) => {
    return request({
        url:`admin/role/${id}/update_status`,
        method:'POST',
        data:{
            status
        }
    })
}